/*  1:   */ package org.intellij.images.editor.impl;
/*  2:   */ 
/*  3:   */

import com.intellij.openapi.fileEditor.FileEditorState;
import com.intellij.openapi.fileEditor.FileEditorStateLevel;
import com.intellij.openapi.fileEditor.TransferableFileEditorState;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/*  4:   */
/*  5:   */
/*  6:   */
/*  7:   */
/*  8:   */
/*  9:   */ 
/* 10:   */ public class ImageFileEditorState
/* 11:   */   implements TransferableFileEditorState, Serializable
/* 12:   */ {
/* 13:   */   private static final long serialVersionUID = -4470317464706072486L;
/* 14:   */   public static final String IMAGE_EDITOR_ID = "ImageEditor";
/* 15:   */   public static final String BACKGROUND_VISIBLE_OPTION = "backgroundVisible";
/* 16:   */   public static final String GRID_VISIBLE_OPTION = "gridVisible";
/* 17:   */   public static final String ZOOM_FACTOR_OPTION = "zoomFactor";
/* 18:   */   private boolean a;
/* 19:   */   private boolean b;
/* 20:   */   private double c;
/* 21:   */   
/* 22:   */   ImageFileEditorState(boolean paramBoolean1, boolean paramBoolean2, double paramDouble)
/* 23:   */   {
/* 24:41 */     this.a = paramBoolean1;
/* 25:42 */     this.b = paramBoolean2;
/* 26:43 */     this.c = paramDouble;
/* 27:   */   }
/* 28:   */   
/* 29:   */   public boolean canBeMergedWith(FileEditorState paramFileEditorState, FileEditorStateLevel paramFileEditorStateLevel)
/* 30:   */   {
/* 31:48 */     return paramFileEditorState instanceof ImageFileEditorState;
/* 32:   */   }
/* 33:   */   
/* 34:   */   public boolean isBackgroundVisible()
/* 35:   */   {
/* 36:52 */     return this.a;
/* 37:   */   }
/* 38:   */   
/* 39:   */   public boolean isGridVisible()
/* 40:   */   {
/* 41:56 */     return this.b;
/* 42:   */   }
/* 43:   */   
/* 44:   */   public double getZoomFactor()
/* 45:   */   {
/* 46:60 */     return this.c;
/* 47:   */   }
/* 48:   */   
/* 49:   */   public String getEditorId()
/* 50:   */   {
/* 51:65 */     return "ImageEditor";
/* 52:   */   }
/* 53:   */   
/* 54:   */   public Map<String, String> getTransferableOptions()
/* 55:   */   {
/* 56:70 */     HashMap localHashMap = new HashMap();
/* 57:71 */     localHashMap.put("backgroundVisible", String.valueOf(this.a));
/* 58:72 */     localHashMap.put("gridVisible", String.valueOf(this.b));
/* 59:73 */     localHashMap.put("zoomFactor", String.valueOf(this.c));
/* 60:74 */     return localHashMap;
/* 61:   */   }
/* 62:   */   
/* 63:   */   public void setTransferableOptions(Map<String, String> paramMap)
/* 64:   */   {
/* 65:79 */     String str = (String)paramMap.get("backgroundVisible");
/* 66:80 */     if (str != null) {
/* 67:81 */       this.a = Boolean.valueOf(str).booleanValue();
/* 68:   */     }
/* 69:84 */     str = (String)paramMap.get("gridVisible");
/* 70:85 */     if (str != null) {
/* 71:86 */       this.b = Boolean.valueOf(str).booleanValue();
/* 72:   */     }
/* 73:89 */     str = (String)paramMap.get("zoomFactor");
/* 74:90 */     if (str != null) {
/* 75:91 */       this.c = Double.parseDouble(str);
/* 76:   */     }
/* 77:   */   }
/* 78:   */ }



/* Location:           E:\idea\

 * Qualified Name:     org.intellij.images.editor.impl.ImageFileEditorState

 * JD-Core Version:    0.7.0.1

 */